﻿using MathNet.Spatial.Euclidean;
using System;
using System.Collections.Generic;
using System.Data;

namespace FDEE.Model
{
    public class BPME4 : BPTMBase
    {

        public BPME4(string typeName, string pierNumber,
            int height, int width, double lwidth, int calculatedHeight, int L1, int L2,
            int span) :
            base(typeName, pierNumber, height, width, lwidth, calculatedHeight, L1, L2, span)
        {
        }


        public override void SetRebarList()
        {
            RebarList = new RebarCollection();
            #region 全局钢筋数量
            int N1 = 15; // 取决于L1,L2差是否是800
            int N212 = 10;
            int N234 = 5;
            int N3 = 15;
            int N4 = 8;
            int N5 = 6;
            int N6 = 14;
            int N11 = 7 * 2;
            int N12 = 6*2;
            int N13 = 8 * 2;
            int N14 = 14 * 2;
            int N15 = 7 * 2;
            int N16 = 4 * 2;
            int N17 = 48 * 2;
            int N18 = 12;
            int N19 = 12;
            #endregion

            #region 1号钢筋
            double LEN1 = (Width - 2 * 50 - 12000 * 3 + 1400 * 2) / 2 - 1000 + 1400;
            double LEN2 = 12000;
            double LEN3 = (Width - 2 * 50 - 12000 * 3 + 1400 * 2) / 2 + 1000 + 1400;
            if (LEN1 > 12000 || LEN3 > 12000)
            {
                throw new Exception("钢筋超过定尺");
            }
            RebarList.Add(new MARebarRecord(1, 1, "", eDB.DB25, (int)LEN1, N1, eShapeType.MA));
            RebarList.Add(new MARebarRecord(1, 2, "", eDB.DB25, (int)LEN3, N1, eShapeType.MA));
            RebarList.Add(new MARebarRecord(1, 3, "", eDB.DB25, (int)LEN2, N1 * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB25] += 6 * N1 * 2;
            #endregion


            #region 2号钢筋
            int C = (int)Math.Round((Width - 100 - 12000 * 3 + 980 * 2) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
            RebarList.Add(new MURebarRecord(2, 1, "", eDB.DB25, N212, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
            C = (int)Math.Round((Width - 100 - 12000 * 3 + 980 * 2) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
            RebarList.Add(new MURebarRecord(2, 2, "", eDB.DB25, N212, eShapeType.MU, 500, 900 - 100 - 16 - 25, C, 200 - 50 - 25 - 16, 75));
            C = (int)Math.Round((Width - 100 - 12000 * 3 + 980 * 2) / 2 - 1000 + 980, MidpointRounding.AwayFromZero);
            RebarList.Add(new MURebarRecord(2, 3, "", eDB.DB25, N234, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
            C = (int)Math.Round((Width - 100 - 12000 * 3 + 980 * 2) / 2 + 1000 + 980, MidpointRounding.AwayFromZero);
            RebarList.Add(new MURebarRecord(2, 4, "", eDB.DB25, N234, eShapeType.MUC, 500, 290 - 50 - 60, C, 200 - 50 - 25 - 16, 0));
            RebarList.Add(new MARebarRecord(2, 5, "", eDB.DB25, 12000, (N234 + N234) * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB25] += 3 * (N234 + N234) * 2;
            #endregion

            #region 3号钢筋
            LEN1 = (Width - 2 * 50 - 12000 * 3+ 1400 * 2) / 2 - 1000 + 1400;
            LEN2 = 12000;
            LEN3 = (Width - 2 * 50 - 12000 * 3 + 1400 * 2) / 2 + 1000 + 1400;
            if (LEN1 > 12000 || LEN3 > 12000)
            {
                throw new Exception("钢筋超过定尺");
            }
            RebarList.Add(new MARebarRecord(3, 1, "", eDB.DB25, (int)LEN1, N3, eShapeType.MA));
            RebarList.Add(new MARebarRecord(3, 2, "", eDB.DB25, (int)LEN3, N3, eShapeType.MA));
            RebarList.Add(new MARebarRecord(3, 3, "", eDB.DB25, (int)LEN2, N3 * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB25] += 6 * N3 * 2;
            #endregion

            #region 4#
            LEN1 = (Width - 2 * 50 - 12000 * 3 + 1400 * 2) / 2 - 1000 + 1400;
            LEN2 = 12000;
            LEN3 = (Width - 2 * 50 - 12000 * 3 + 1400 * 2) / 2 + 1000 + 1400;
            if (LEN1 > 12000 || LEN3 > 12000)
            {
                throw new Exception("钢筋超过定尺");
            }
            RebarList.Add(new MARebarRecord(4, 1, "", eDB.DB25, (int)LEN1, N4, eShapeType.MA));
            RebarList.Add(new MARebarRecord(4, 2, "", eDB.DB25, (int)LEN3, N4, eShapeType.MA));
            RebarList.Add(new MARebarRecord(4, 3, "", eDB.DB25, (int)LEN2, N4 * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB25] += 6 * N4 * 2;
            #endregion

            #region 5# 6#
            LEN1 = (Width - 2 * 50 - 12000 * 3 + 640 * 2) / 2 - 1000 + 640;
            LEN2 = 12000;
            LEN3 = (Width - 2 * 50 - 12000 * 3 + 640 * 2) / 2 + 1000 + 640;
            if (LEN1 > 12000 || LEN3 > 12000)
            {
                throw new Exception("钢筋超过定尺");
            }
            RebarList.Add(new MARebarRecord(5, 1, "", eDB.DB16, (int)LEN1, N5, eShapeType.MA));
            RebarList.Add(new MARebarRecord(5, 2, "", eDB.DB16, (int)LEN3, N5, eShapeType.MA));
            RebarList.Add(new MARebarRecord(5, 3, "", eDB.DB16, (int)LEN2, N5 * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB16] += 6 * N5 * 2;

            RebarList.Add(new MARebarRecord(6, 1, "", eDB.DB16, (int)LEN1, N6, eShapeType.MA));
            RebarList.Add(new MARebarRecord(6, 2, "", eDB.DB16, (int)LEN3, N6, eShapeType.MA));
            RebarList.Add(new MARebarRecord(6, 3, "", eDB.DB16, (int)LEN2, N6 * 3, eShapeType.MA));
            UboltList.UBoltNum[eDB.DB16] += 6 * N6 * 2;
            #endregion

            #region  7# 
            //var AA = CalculatedHeight - 2 * 50 - 16 - 25;
            //var BB = L1 - 2 * 50 - 2 * 16;
            //int quan = (int)Math.Round(Width / 150, MidpointRounding.AwayFromZero) + 1;
            //RebarList.Add(new MCRebarRecord(5, 0, "", eDB.DB25, AA, BB, AA, quan, eShapeType.MCB));
            //AA = CalculatedHeight - 2 * 50 - 25 - 25;
            //RebarList.Add(new MCRebarRecord(6, 0, "", eDB.DB16, AA, BB, AA, quan, eShapeType.MCB));
            int quan = (int)Math.Round(Width / 300, MidpointRounding.AwayFromZero) + 1;
            RebarList.Add(new MORebarRecord(7, 0, "", eDB.DB16, quan, eShapeType.MO, L1 - 2 * 50 - 2 * 16, 350));

            #endregion

            #region 8#

            var LSide = 5300;// 两侧加密长度

            quan = 53 * 2 + (int)Math.Round((Width - LSide * 2 - 100) / 250, MidpointRounding.AwayFromZero) - 1;
            int AA = Height - 2 * 50 - 2 * 16;
            int BB = L2 - 2 * 50 - 2 * 16;
            RebarList.Add(new MORebarRecord(8, 1, "", eDB.DB16, quan, eShapeType.MO, AA, BB));
            //RebarList.Add(new MORebarRecord(9, 2, "", eDB.DB16, quan, eShapeType.MO90, AA, 2 * 270 + 120));
            RebarList.Add(new MORebarRecord(8, 2, "", eDB.DB16, quan, eShapeType.MO, AA, 105 * 6 + 25));
            #endregion

            #region 9、10#
            AA = CalculatedHeight - 2 * 50 - 16 - 25;
            BB = L1 - 2 * 50 - 2 * 16;
            quan = (int)Math.Round(Width / 150, MidpointRounding.AwayFromZero) + 1;
            RebarList.Add(new MCRebarRecord(9, 0, "", eDB.DB25, AA, BB, AA, quan, eShapeType.MCB));
            AA = CalculatedHeight - 2 * 50 - 25 - 25;
            RebarList.Add(new MCRebarRecord(10, 0, "", eDB.DB16, AA, BB, AA, quan, eShapeType.MCB));
            #endregion

            #region 12#-17#

            int BlockThick = 200;

            AA = 1500 - 50;
            BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
            BB = 294;
            RebarList.Add(new MCRebarRecord(11, 0, "", eDB.DB12, AA, BB, AA, N11, eShapeType.MCB));
            //RebarList.Add(new MURebarRecord(12, 0, "", eDB.DB25, N12, eShapeType.MU, 750, Height - 100, 1000, 109, 75));
            RebarList.Add(new MURebarRecord(12, 0, "", eDB.DB25, N12, eShapeType.MUR, 1450, Height - 100, 1450, 109, 75));
            AA = Height - 2 * 50;
            BB = BlockThick - 2 * 50 - 2 * 12;
            RebarList.Add(new MCRebarRecord(13, 0, "", eDB.DB12, AA, BB, AA, N13, eShapeType.MCB));
            AA = BlockThick - 2 * 50 - 2 * 12;
            BB = (int)Math.Round((L1 - L2) * 0.5 - 2 * 50 - 2 * 12, MidpointRounding.AwayFromZero);
            RebarList.Add(new MORebarRecord(14, 0, "", eDB.DB12, N14, eShapeType.MO, AA, BB));
            AA = Height - 100 - 2 * 12;
            BB = 1200 - 2 * 50 - 2 * 12;
            RebarList.Add(new MORebarRecord(15, 0, "", eDB.DB12, N15, eShapeType.MO, AA, BB));
            RebarList.Add(new MORebarRecord(16, 0, "", eDB.DB12, N16, eShapeType.MO, AA, BB));
            #endregion

            #region 18#
            AA = L2 - 2 * 50;
            RebarList.Add(new MCRebarRecord(17, 0, "", eDB.DB12, AA, 500, AA, N17, eShapeType.MCR));

            AA = 1500 - 50;
            BB = 2 * 217 + 120 + 2 * 25 + 2 * 12;
            BB = 294;
            RebarList.Add(new MCRebarRecord(18, 0, "", eDB.DB12, AA, BB, AA, N18, eShapeType.MCT));
            AA = Height - 100 - 2 * 50;
            RebarList.Add(new MARebarRecord(19, 0, "", eDB.DB12, AA, N19, eShapeType.MA));
            #endregion

        }

        public override void SetTendonList(ref System.Data.DataTable ElongTable)
        {
            TendonDistribute = new RebarTendonDistribute(320, new List<double>() { 435, 435 });
          
            if (Width >= 52*1000)
            {
                // PME4-T1,T2，T3
                List<Point2D> PT = new List<Point2D>(){
                new Point2D(0 , 2.2),new Point2D(2.5 , 1.8),new Point2D(5 , 1.45),new Point2D(7.5 , 1.15),
                new Point2D(10 , 0.9),new Point2D(12.5 , 0.85),new Point2D(15 , 0.8),new Point2D(17.5 , 0.8),
                new Point2D(20 , 0.8),new Point2D(22.5 , 0.836),new Point2D(25 , 0.871),new Point2D(27 , 0.9),
                new Point2D(29.5 , 1),new Point2D(32 , 1.1),new Point2D(34.5 , 1.4),new Point2D(37 , 1.7),
                new Point2D(39.5 , 1.75),new Point2D(42 , 1.8),new Point2D(44.5 , 1.785),new Point2D(47 , 1.77),
                new Point2D(49.5 , 1.735),new Point2D(52 , 1.7), };

                TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT),ref ElongTable);
                TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                // PME4-T4,T5，T6
                PT = new List<Point2D>(){
                new Point2D(0 , 1.75),new Point2D(2.5 , 1.375),new Point2D(5 , 1),new Point2D(7.5 , 0.85),
                new Point2D(10 , 0.7),new Point2D(12.5 , 0.65),new Point2D(15 , 0.6),new Point2D(17.5 , 0.6),
                new Point2D(20 , 0.6),new Point2D(22.5 , 0.636),new Point2D(25 , 0.671),new Point2D(27 , 0.7),
                new Point2D(29.5 , 0.8),new Point2D(32 , 0.9),new Point2D(34.5 , 1.175),new Point2D(37 , 1.45),
                new Point2D(39.5 , 1.5),new Point2D(42 , 1.55),new Point2D(44.5 , 1.5),new Point2D(47 , 1.45),
                new Point2D(49.5 , 1.35),new Point2D(52 , 1.25),};

                TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                // PME4-T7,T8，T9
                PT = new List<Point2D>(){
                new Point2D(0 , 1.3),new Point2D(2.5 , 1),new Point2D(5 , 0.7),new Point2D(7.5 , 0.575),
                new Point2D(10 , 0.45),new Point2D(12.5 , 0.425),new Point2D(15 , 0.4),new Point2D(17.5 , 0.4),
                new Point2D(20 , 0.4),new Point2D(22.5 , 0.417),new Point2D(25 , 0.436),new Point2D(27 , 0.45),
                new Point2D(29.5 ,0.55),new Point2D(32 , 0.65),new Point2D(34.5 , 0.925),new Point2D(37 , 1.2),
                new Point2D(39.5 , 1.275),new Point2D(42 , 1.35),new Point2D(44.5 , 1.25),new Point2D(47 , 1.15),
                new Point2D(49.5 , 0.975),new Point2D(52 , 0.8), };

                TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                // PME4-T10,T11，T12
                PT = new List<Point2D>(){
                new Point2D(0 , 0.85),new Point2D(2.5 , 0.6),new Point2D(5 , 0.35),new Point2D(7.5 , 0.275),
                new Point2D(10 , 0.2),new Point2D(12.5 , 0.2),new Point2D(15 , 0.2),new Point2D(17.5 , 0.2),
                new Point2D(20 , 0.2),new Point2D(22.5 , 0.2),new Point2D(25 , 0.2),new Point2D(27 , 0.2),
                new Point2D(29.5 , 0.3),new Point2D(32 , 0.4),new Point2D(34.5 , 0.675),new Point2D(37 , 0.95),
                new Point2D(39.5 , 1.05),new Point2D(42 , 1.15),new Point2D(44.5 , 1),new Point2D(47 , 0.85),
                new Point2D(49.5 , 0.6),new Point2D(52 , 0.35),};

                TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
            }
            else
            {
                if (PierNumber == "P-325")
                {
                    // PME4-T1,T2，T3
                    List<Point2D> PT = new List<Point2D>(){
                new Point2D(0 , 2.2),new Point2D(2.222 , 1.8),new Point2D(4.458 , 1.45),new Point2D(6.750 , 1.15),
                new Point2D(9.041 , 0.9),new Point2D(11.333 , 0.85),new Point2D(13.624 , 0.8),new Point2D(15.916 , 0.8),
                new Point2D(18.207 , 0.8),new Point2D(20.498 , 0.836),new Point2D(22.79 , 0.871),new Point2D(24.624 , 0.9),
                new Point2D(26.915 , 1),new Point2D(29.207 , 1.1),new Point2D(31.498 , 1.4),new Point2D(33.79 , 1.7),
                new Point2D(35.856 , 1.75),new Point2D(37.898 , 1.8),new Point2D(39.398 , 1.785),new Point2D(40.898 , 1.77),
                new Point2D(42.398 , 1.735),new Point2D(43.898 , 1.7), };

                    TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                    // PME4-T4,T5，T6
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.75),new Point2D(2.222 , 1.375),new Point2D(4.458 , 1),new Point2D(6.75 , 0.85),
                new Point2D(9.041 , 0.7),new Point2D(11.333 , 0.65),new Point2D(13.624 , 0.6),new Point2D(15.916 , 0.6),
                new Point2D(18.207 , 0.6),new Point2D(20.498 , 0.636),new Point2D(22.79 , 0.671),new Point2D(24.624 , 0.7),
                new Point2D(26.915 , 0.8),new Point2D(29.207 , 0.9),new Point2D(31.498 , 1.175),new Point2D(33.79 , 1.45),
                new Point2D(35.856 , 1.5),new Point2D(37.898 , 1.55),new Point2D(39.398 , 1.5),new Point2D(40.898 , 1.45),
                new Point2D(42.398 , 1.35),new Point2D(43.898 , 1.25),};

                    TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T7,T8，T9
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.3),new Point2D(2.222 , 1),new Point2D(4.458 , 0.7),new Point2D(6.75 , 0.575),
                new Point2D(9.041 , 0.45),new Point2D(11.333 , 0.425),new Point2D(13.624 , 0.4),new Point2D(15.916 , 0.4),
                new Point2D(18.207 , 0.4),new Point2D(20.498 , 0.417),new Point2D(22.79 , 0.436),new Point2D(24.624 , 0.45),
                new Point2D(26.915 ,0.55),new Point2D(29.207 , 0.65),new Point2D(31.498 , 0.925),new Point2D(33.79 , 1.2),
                new Point2D(35.856 , 1.275),new Point2D(37.898 , 1.35),new Point2D(39.398 , 1.25),new Point2D(40.898 , 1.15),
                new Point2D(42.398 , 0.975),new Point2D(43.898 , 0.8), };

                    TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T10,T11，T12
                    PT = new List<Point2D>(){
                new Point2D(0 , 0.85),new Point2D(2.222 , 0.6),new Point2D(4.458 , 0.35),new Point2D(6.75 , 0.275),
                new Point2D(9.041 , 0.2),new Point2D(11.333 , 0.2),new Point2D(13.624 , 0.2),new Point2D(15.916 , 0.2),
                new Point2D(18.207 , 0.2),new Point2D(20.498 , 0.2),new Point2D(22.79 , 0.2),new Point2D(24.624 , 0.2),
                new Point2D(26.915 , 0.3),new Point2D(29.207 , 0.4),new Point2D(31.498 , 0.675),new Point2D(33.79 , 0.95),
                new Point2D(35.856 , 1.05),new Point2D(37.898 , 1.15),new Point2D(39.398 , 1),new Point2D(40.898 , 0.85),
                new Point2D(42.398 , 0.6),new Point2D(43.898 , 0.35), };

                    TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                }
                //else if(PierNumber=="P-326")
                //{
                //    // PME4-T1,T2，T3
                //    List<Point2D> PT = new List<Point2D>(){
                //new Point2D(0 , 2.2),new Point2D(1.778 , 1.8),new Point2D(3.638 , 1.45),new Point2D(5.825 , 1.15),
                //new Point2D(8.013 , 0.9),new Point2D(10.167 , 0.85),new Point2D(12.388 , 0.8),new Point2D(14.576 , 0.8),
                //new Point2D(16.764 , 0.8),new Point2D(18.936 , 0.836),new Point2D(21.137 , 0.871),new Point2D(22.899 , 0.9),
                //new Point2D(25.077 , 1),new Point2D(27.265 , 1.1),new Point2D(29.453 , 1.4),new Point2D(31.64 , 1.7),
                //new Point2D(33.828 , 1.75),new Point2D(35.355 , 1.8),new Point2D(36.442 , 1.785),new Point2D(37.529 , 1.77),
                //new Point2D(38.616 , 1.735),new Point2D(39.703 , 1.7), };

                //    TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                //    // PME4-T4,T5，T6
                //    PT = new List<Point2D>(){
                //new Point2D(0 , 1.75),new Point2D(1.778 , 1.375),new Point2D(3.638 , 1),new Point2D(5.825 , 0.85),
                //new Point2D(8.013 , 0.7),new Point2D(10.167 , 0.65),new Point2D(12.388 , 0.6),new Point2D(14.576 , 0.6),
                //new Point2D(16.764 , 0.6),new Point2D(18.936 , 0.636),new Point2D(21.137 , 0.671),new Point2D(22.899 , 0.7),
                //new Point2D(25.077 , 0.8),new Point2D(27.265 , 0.9),new Point2D(29.453 , 1.175),new Point2D(31.64 , 1.45),
                //new Point2D(33.828 , 1.5),new Point2D(35.355 , 1.55),new Point2D(36.442 , 1.5),new Point2D(37.529 , 1.45),
                //new Point2D(38.616 , 1.35),new Point2D(39.703 , 1.25),};

                //    TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    // PME4-T7,T8，T9
                //    PT = new List<Point2D>(){
                //new Point2D(0 , 1.3),new Point2D(1.778 , 1),new Point2D(3.638 , 0.7),new Point2D(5.825 , 0.575),
                //new Point2D(8.013 , 0.45),new Point2D(10.167 , 0.425),new Point2D(12.388 , 0.4),new Point2D(14.576 , 0.4),
                //new Point2D(16.764 , 0.4),new Point2D(18.936 , 0.417),new Point2D(21.137 , 0.436),new Point2D(22.899 , 0.45),
                //new Point2D(25.077 ,0.55),new Point2D(27.265 , 0.65),new Point2D(29.453 , 0.925),new Point2D(31.64 , 1.2),
                //new Point2D(33.828 , 1.275),new Point2D(35.355 , 1.35),new Point2D(36.442 , 1.25),new Point2D(37.529 , 1.15),
                //new Point2D(38.616 , 0.975),new Point2D(39.703 , 0.8), };

                //    TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    // PME4-T10,T11，T12
                //    PT = new List<Point2D>(){
                //new Point2D(0 , 0.85),new Point2D(1.778 , 0.6),new Point2D(3.638 , 0.35),new Point2D(5.825 , 0.275),
                //new Point2D(8.013 , 0.2),new Point2D(10.167 , 0.2),new Point2D(12.388 , 0.2),new Point2D(14.576 , 0.2),
                //new Point2D(16.764 , 0.2),new Point2D(18.936 , 0.2),new Point2D(21.137 , 0.2),new Point2D(22.899 , 0.2),
                //new Point2D(25.077 , 0.3),new Point2D(27.265 , 0.4),new Point2D(29.453 , 0.675),new Point2D(31.64 , 0.95),
                //new Point2D(33.828 , 1.05),new Point2D(35.355 , 1.15),new Point2D(36.442 , 1),new Point2D(37.529 , 0.85),
                //new Point2D(38.616 , 0.6),new Point2D(39.703 , 0.35), };

                //    TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //    TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                //}
                if (PierNumber == "P-326")
                {
                    // PME4-T1,T2，T3
                    List<Point2D> PT = new List<Point2D>(){
                new Point2D(0 , 2.2),new Point2D(2, 1.8),new Point2D(4.038 , 1.45),new Point2D(6.225, 1.15),
                new Point2D(8.413 , 0.9),new Point2D(10.6 , 0.85),new Point2D(12.788 , 0.8),new Point2D(14.976 , 0.8),
                new Point2D(17.163 , 0.8),new Point2D(19.351 , 0.836),new Point2D(21.539 , 0.871),new Point2D(23.289 , 0.9),
                new Point2D(25.476 , 1),new Point2D(27.664 , 1.1),new Point2D(29.852 , 1.4),new Point2D(32.039 , 1.7),
                new Point2D(34.227 , 1.75),new Point2D(35.754 , 1.8),new Point2D(36.841 , 1.785),new Point2D(37.928 , 1.77),
                new Point2D(39.015 , 1.735),new Point2D(40.102 , 1.7), };

                    TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                    // PME4-T4,T5，T6
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.75),new Point2D(2 , 1.375),new Point2D(4.038 , 1),new Point2D(6.225 , 0.85),
                new Point2D(8.413 , 0.7),new Point2D(10.6 , 0.65),new Point2D(12.788 , 0.6),new Point2D(14.976 , 0.6),
                new Point2D(17.163 , 0.6),new Point2D(19.351 , 0.636),new Point2D(21.539 , 0.671),new Point2D(23.289 , 0.7),
                new Point2D(25.476 , 0.8),new Point2D(27.664 , 0.9),new Point2D(29.852 , 1.175),new Point2D(32.039 , 1.45),
                new Point2D(34.227 , 1.5),new Point2D(35.754 , 1.55),new Point2D(36.841 , 1.5),new Point2D(37.928 , 1.45),
                new Point2D(39.015 , 1.35),new Point2D(40.102 , 1.25),};

                    TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T7,T8，T9
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.3),new Point2D(2 , 1),new Point2D(4.038 , 0.7),new Point2D(6.225 , 0.575),
                new Point2D(8.413 , 0.45),new Point2D(10.6 , 0.425),new Point2D(12.788 , 0.4),new Point2D(14.976 , 0.4),
                new Point2D(17.163 , 0.4),new Point2D(19.351 , 0.417),new Point2D(21.539 , 0.436),new Point2D(23.289 , 0.45),
                new Point2D(25.476 ,0.55),new Point2D(27.664 , 0.65),new Point2D(29.852 , 0.925),new Point2D(32.039 , 1.2),
                new Point2D(34.227 , 1.275),new Point2D(35.754 , 1.35),new Point2D(36.841 , 1.25),new Point2D(37.928 , 1.15),
                new Point2D(39.015 , 0.975),new Point2D(40.102 , 0.8), };

                    TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T10,T11，T12
                    PT = new List<Point2D>(){
                new Point2D(0 , 0.85),new Point2D(2 , 0.6),new Point2D(4.038 , 0.35),new Point2D(6.225 , 0.275),
                new Point2D(8.413 , 0.2),new Point2D(10.6 , 0.2),new Point2D(12.788 , 0.2),new Point2D(14.976 , 0.2),
                new Point2D(17.163 , 0.2),new Point2D(19.351 , 0.2),new Point2D(21.539 , 0.2),new Point2D(23.289 , 0.2),
                new Point2D(25.476 , 0.3),new Point2D(27.664 , 0.4),new Point2D(29.852 , 0.675),new Point2D(32.039 , 0.95),
                new Point2D(34.227 , 1.05),new Point2D(35.754 , 1.15),new Point2D(36.841 , 1),new Point2D(37.928 , 0.85),
                new Point2D(39.015 , 0.6),new Point2D(40.102 , 0.35), };

                    TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                }
                else if (PierNumber == "P-334")
                {
                    // PME4-T1,T2，T3
                    List<Point2D> PT = new List<Point2D>(){
                new Point2D(0 , 2.2),new Point2D(2, 1.8),new Point2D(4.031 , 1.45),new Point2D(6.183 , 1.15),
                new Point2D(8.336 , 0.9),new Point2D(10.489 , 0.85),new Point2D(12.642 , 0.8),new Point2D(14.794 , 0.8),
                new Point2D(16.947 , 0.8),new Point2D(19.1 , 0.836),new Point2D(21.253 , 0.871),new Point2D(22.975 , 0.9),
                new Point2D(25.128 , 1),new Point2D(27.281 , 1.1),new Point2D(29.443 , 1.4),new Point2D(31.586 , 1.7),
                new Point2D(33.739 , 1.75),new Point2D(35.435 , 1.8),new Point2D(36.827 , 1.785),new Point2D(38.219 , 1.77),
                new Point2D(39.610 , 1.735),new Point2D(41.002 , 1.7), };

                    TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                    // PME4-T4,T5，T6
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.75),new Point2D(2 , 1.375),new Point2D(4.031 , 1),new Point2D(6.183 , 0.85),
                new Point2D(8.336 , 0.7),new Point2D(10.489 , 0.65),new Point2D(12.642 , 0.6),new Point2D(14.794 , 0.6),
                new Point2D(16.947 , 0.6),new Point2D(19.1 , 0.636),new Point2D(21.253 , 0.671),new Point2D(22.975 , 0.7),
                new Point2D(25.128 , 0.8),new Point2D(27.281 , 0.9),new Point2D(29.443 , 1.175),new Point2D(31.586 , 1.45),
                new Point2D(33.739 , 1.5),new Point2D(35.435 , 1.55),new Point2D(36.827 , 1.5),new Point2D(38.219 , 1.45),
                new Point2D(39.610 , 1.35),new Point2D(41.002 , 1.25),};

                    TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T7,T8，T9
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.3),new Point2D(2 , 1),new Point2D(4.031 , 0.7),new Point2D(6.183 , 0.575),
                new Point2D(8.336 , 0.45),new Point2D(10.489 , 0.425),new Point2D(12.642 , 0.4),new Point2D(14.794 , 0.4),
                new Point2D(16.947 , 0.4),new Point2D(19.1 , 0.417),new Point2D(21.253 , 0.436),new Point2D(22.975 , 0.45),
                new Point2D(25.128 ,0.55),new Point2D(27.281 , 0.65),new Point2D(29.443 , 0.925),new Point2D(31.586 , 1.2),
                new Point2D(33.739 , 1.275),new Point2D(35.435 , 1.35),new Point2D(36.827 , 1.25),new Point2D(38.219 , 1.15),
                new Point2D(39.610 , 0.975),new Point2D(41.002 , 0.8), };

                    TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T10,T11，T12
                    PT = new List<Point2D>(){
                new Point2D(0 , 0.85),new Point2D(2 , 0.6),new Point2D(4.031 , 0.35),new Point2D(6.183 , 0.275),
                new Point2D(8.336 , 0.2),new Point2D(10.489 , 0.2),new Point2D(12.642 , 0.2),new Point2D(14.794 , 0.2),
                new Point2D(16.947 , 0.2),new Point2D(19.1 , 0.2),new Point2D(21.253 , 0.2),new Point2D(22.975 , 0.2),
                new Point2D(25.128 , 0.3),new Point2D(27.281 , 0.4),new Point2D(29.443 , 0.675),new Point2D(31.586 , 0.95),
                new Point2D(33.739 , 1.05),new Point2D(35.435 , 1.15),new Point2D(36.827 , 1),new Point2D(38.219 , 0.85),
                new Point2D(39.610 , 0.6),new Point2D(41.002 , 0.35), };

                    TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                }
                else if (PierNumber == "P-335")
                {
                    // PME4-T1,T2，T3
                    List<Point2D> PT = new List<Point2D>(){
                new Point2D(0 , 2.2),new Point2D(2 , 1.8),new Point2D(4.072 , 1.45),new Point2D(6.433 , 1.15),
                new Point2D(8.794 , 0.9),new Point2D(11.156 , 0.85),new Point2D(13.517 , 0.8),new Point2D(15.878 , 0.8),
                new Point2D(18.239 , 0.8),new Point2D(20.6 , 0.836),new Point2D(22.961 , 0.871),new Point2D(24.850 , 0.9),
                new Point2D(27.211 , 1),new Point2D(29.572 , 1.1),new Point2D(31.933 , 1.4),new Point2D(34.294 , 1.7),
                new Point2D(36.656 , 1.75),new Point2D(38.370 , 1.8),new Point2D(39.652 , 1.785),new Point2D(40.935 , 1.77),
                new Point2D(42.217 , 1.735),new Point2D(43.5 , 1.7), };

                    TendonList.Add(new PLTendonRecord(1, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(2, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(3, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);

                    // PME4-T4,T5，T6
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.75),new Point2D(2 , 1.375),new Point2D(4.072 , 1),new Point2D(6.433 , 0.85),
                new Point2D(8.794 , 0.7),new Point2D(11.156 , 0.65),new Point2D(13.517 , 0.6),new Point2D(15.878 , 0.6),
                new Point2D(18.239 , 0.6),new Point2D(20.6 , 0.636),new Point2D(22.961 , 0.671),new Point2D(24.850 , 0.7),
                new Point2D(27.211 , 0.8),new Point2D(29.572 , 0.9),new Point2D(31.933 , 1.175),new Point2D(34.294 , 1.45),
                new Point2D(36.656 , 1.5),new Point2D(38.370 , 1.55),new Point2D(39.652 , 1.5),new Point2D(40.935 , 1.45),
                new Point2D(42.217 , 1.35),new Point2D(43.5 , 1.25),};

                    TendonList.Add(new PLTendonRecord(4, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(5, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(6, 1, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T7,T8，T9
                    PT = new List<Point2D>(){
                new Point2D(0 , 1.3),new Point2D(2 , 1),new Point2D(4.072 , 0.7),new Point2D(6.433 , 0.575),
                new Point2D(8.794 , 0.45),new Point2D(11.156 , 0.425),new Point2D(13.517 , 0.4),new Point2D(15.878 , 0.4),
                new Point2D(18.239 , 0.4),new Point2D(20.6 , 0.417),new Point2D(22.961 , 0.436),new Point2D(24.850 , 0.45),
                new Point2D(27.211 ,0.55),new Point2D(29.572 , 0.65),new Point2D(31.933 , 0.925),new Point2D(34.294 , 1.2),
                new Point2D(36.656 , 1.275),new Point2D(38.370 , 1.35),new Point2D(39.652 , 1.25),new Point2D(40.935 , 1.15),
                new Point2D(42.217 , 0.975),new Point2D(43.5 , 0.8), };

                    TendonList.Add(new PLTendonRecord(7, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(8, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(9, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    // PME4-T10,T11，T12
                    PT = new List<Point2D>(){
                new Point2D(0 , 0.85),new Point2D(2 , 0.6),new Point2D(4.072 , 0.35),new Point2D(6.433 , 0.275),
                new Point2D(8.794 , 0.2),new Point2D(11.156 , 0.2),new Point2D(13.517 , 0.2),new Point2D(15.878 , 0.2),
                new Point2D(18.239 , 0.2),new Point2D(20.6 , 0.2),new Point2D(22.961 , 0.2),new Point2D(24.850 , 0.2),
                new Point2D(27.211 , 0.3),new Point2D(29.572 , 0.4),new Point2D(31.933 , 0.675),new Point2D(34.294 , 0.95),
                new Point2D(36.656 , 1.05),new Point2D(38.370 , 1.15),new Point2D(39.652 , 1),new Point2D(40.935 , 0.85),
                new Point2D(42.217 , 0.6),new Point2D(43.5 , 0.35), };

                    TendonList.Add(new PLTendonRecord(10, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(11, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                    TendonList.Add(new PLTendonRecord(12, 2, eStrandClass.S152, 31, eForceType.BothEnd, 6131, PT), ref ElongTable);
                }
                //ElongTable.Rows.Count;
            }
        }
    }
}
